home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.1 KB | 48 lines | [TEXT/GEOL] |
- Item 9504208 21-Oct-88 14:42
-
- From: ROSENSTEIN1 Rosenstein, Larry
-
- To: D1713 Attachmate, Dev, John Bartleson
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: re Response to Questions
-
- MacApp 1.1 explicitly makes the segments containing the routines
- CmdFromMenuItem and BuildAllReserves resident in the procedure InitToolBox.
- MacApp 2.0b5 calls LoadResidentSegments, which makes all the segments listed in
- any the res! resource resident (as you indicated). Marking a segment as
- resident is done with a call to SetResidentSegment. All this does is cause
- UnloadAllSegments to skip the segment. (The Segment Loader has no notion of a
- resident segment; this is a MacApp concept.)
-
- The question about having enough memory to load a segment is important. The
- Segment Loader will bomb if it can't load a segment (mainly because there is
- nothing else for it to do).
-
- You prevent this from happening with the seg! and mem! resources. You indicate
- to MacApp the amount of memory to reserve for code segments and similar
- resources. MacApp will maintain keep this memory in reserve and only release
- it when needed to load a code segment. Normally, you figure out the maximum
- amount of code loaded at one time, and list those segment names in the seg!
- resource. The mem! resource allows you to add a little extra slop (for things
- such as window defprocs, packages, etc.)
-
- There is no (clean) way to get the address of a method. Creating a regular
- procedure that calls the method is the best approach. The problem is that the
- code that gets called depends on the object receiving the message and the
- message itself, and in general will be different for different receivers.
-
- If you want to call a method from an I/O completion routine, you have to beware
- because objects are handles, and you cannot depend on unlocked handles being
- consistent at interrupt level. You should, however, be able to lock the object
- and send messages to that object at interrupt level. (All the other
- restrictions on interrupt level code still apply as well.)
-
- Larry Rosenstein
-
-
-
-
-
-